package com.it.reggie.Mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.it.reggie.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {


    //根据用户名判断用户是否存在
    @Select("select * from employee where username = #{username};")
    Employee UserNameLoing(String username);

    //分页查询
    List<Employee> Paging(@Param("page") int page, @Param("pageSize")int pageSize, @Param("name") String name);
    // 查询总条数
    @Select("select count(*) from employee;")
    int selectTotalCount();
}
